home *** CD-ROM | disk | FTP | other *** search
/ Entertainment Pack / SoftKey Entertainment Pack (Games and Multimedia)(SoftKey Multimedia)(NEW844AE-CD2)(1996).ISO / programs / dosgames / arcade / corwp20 / relay.rpp < prev    next >
Text File  |  1991-03-25  |  2KB  |  57 lines

  1. ;-------------------------------------------------------;
  2. ; RELAY - NO-PCT Version
  3. ;
  4. ;  distributes fixed number of processes at regular
  5. ;  spacing, restores child process if damaged,
  6. ;  otherwise bombs interval
  7. ;  -> extremely regenerative
  8. ;  11/5/90 Stefan Strack
  9. ;-------------------------------------------------------;
  10. rem ------- This file has to be preprocessed by RPP
  11. rem ------- Equates --------------------
  12. rem change the next line for a different distance between program copies
  13.         equ     spacing         1000
  14.         equ     gobomb          (binit last -)
  15.         equ     bombinit        (last bomb - bombincr +)
  16.         equ     bomconts        0
  17.         equ     bombincr        4
  18.         equ     bombcount       (spacing 24 - bombincr /)
  19. rem
  20. rem ------- Dummy data for labels
  21. rem ------- In front to prevent subversion by IMP
  22. source:         nop
  23. destin:         nop
  24. lcounter:       nop
  25. bcounter:       nop
  26. bombaddr:       nop
  27. choicep:        nop
  28. rem
  29. rem ------- If program ahead is founder, do not copy, else
  30. rem ------- Set up pointers for copy
  31. first:  cmp     #gobomb                         choicep
  32.         jmp     binit
  33. begin:  mov     #(last copy - 1 +)              source
  34.         mov     #(last copy - 1 + spacing +)    destin
  35.         mov     #(last first - 1 +)             lcounter
  36. rem
  37. rem ------- Copy program ahead 1000
  38. copy:   mov     \source                         \destin
  39.         djn     copy                            lcounter
  40. rem
  41. rem ------- Start subprocess at new copy
  42.         spl     (first spacing +)
  43. rem ------- Inform parent of "no error"
  44. binit:  mov     #gobomb                         (choicep spacing -)
  45. rem ------- Reset choice to "error occurred"
  46.         mov     #(begin last -)                 choicep
  47. rem
  48. rem ------- Bomb space between here and child
  49.         mov     #bombinit       bombaddr
  50.         mov     #bombcount      bcounter
  51. bomb:   mov     #bomconts       ^bombaddr
  52.         add     #bombincr       bombaddr
  53.         djn     bomb            bcounter
  54. rem ------- Done, child has not acknowledged: goto begin (copy)
  55. rem ------- Child reported "no error": goto binit
  56. last:   jmp     ^choicep
  57.